﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CRMSystemV2.Web.Sys
{
    public partial class UserEdit : System.Web.UI.Page
    {
        private readonly CRMSystemAPI.CRMSystemAPIClient api = new CRMSystemAPI.CRMSystemAPIClient();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack&&Request["id"]!=null)
            {
                BindData();
            }
        }
        private void BindData()
        {
            //为了使用Repeater的绑定，故需要构造数据源
            IList<Model.User> list = new List<Model.User>();
            list.Add(api.GetUser(Request["id"]));

            Repeater1.DataSource = list;
            Repeater1.DataBind();
        }
    }
}